package com.augurit.gzcgwsp.ywcmn.dao;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.augurit.common.base.dao.BaseDao;
import com.augurit.gzcgwsp.ywcmn.entity.YwComFinalQyxx;

/**
 * <P>title:企业基本信息dao--原始数据</p>																								
 * <P>Description：</p>
 * <p>Copyright: Copyright (c) 2011 augurit</p>
 * <p>Company: 广州奥格智能科技</p>
 * History：
 * @author:zhangjun
 * @date 2011-10-12
 * @version 1.0
 */
@Repository
public class YwComQyxxFinalDao extends BaseDao<YwComFinalQyxx, Long> {
    
      /**
       * 查询原始数据表的企业基本信息
       * @param qyid 企业id--临时表企业信息的id
       * @return
       */
      public   YwComFinalQyxx getEntityByQyId(Long qyid){
          Session session=getSession();
          Criteria criteria=session.createCriteria(YwComFinalQyxx.class);
          criteria.add(Restrictions.eq("qyid", qyid));
          List<YwComFinalQyxx> list=criteria.list();
          if(list!=null && list.size()>0){
              return list.get(0);
          }
          return null;
      }
    
    
}

